<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
  <title id="ah136704">ALTER COLLATION</title>
  <body>
    <p id="sql_command_desc">Changes the definition of a collation.</p>
    <section id="section2"><title>Synopsis</title>
      <codeblock id="sql_command_synopsis">ALTER COLLATION <varname>name</varname> RENAME TO <varname>new_name</varname>

ALTER COLLATION <varname>name</varname> OWNER TO <varname>new_owner</varname>

ALTER COLLATION <varname>name</varname> SET SCHEMA <varname>new_schema</varname></codeblock>
    </section>
    <section id="section4">
      <title>Parameters</title>
      <parml>
        <plentry>
          <pt><varname>name</varname></pt>
          <pd>The name (optionally schema-qualified) of an existing collation.</pd>
        </plentry>
        <plentry>
          <pt><varname>new_name</varname></pt>
          <pd>The new name of the collation.</pd>
        </plentry>
        <plentry>
          <pt><varname>new_owner</varname></pt>
          <pd>The new owner of the collation.</pd>
        </plentry>
        <plentry>
          <pt><varname>new_schema</varname></pt>
          <pd>The new schema for the collation.</pd>
        </plentry>
      </parml>
    </section>
    <section id="section3">
      <title>Description</title>
      <p>You must own the collation to use <codeph>ALTER COLLATION</codeph>. To alter the owner, you
        must also be a direct or indirect member of the new owning role, and that role must have
          <codeph>CREATE</codeph> privilege on the collation's schema. (These restrictions enforce
        that altering the owner doesn't do anything you couldn't do by dropping and recreating the
        collation. However, a superuser can alter ownership of any collation anyway.) </p>
    </section>
    <section id="section5">
      <title>Examples</title>
      <p>To rename the collation <varname>de_DE</varname> to <codeph>german</codeph>: </p>
      <codeblock>ALTER COLLATION "de_DE" RENAME TO german;</codeblock>
      <p>To change the owner of the collation <codeph>en_US</codeph> to <codeph>joe</codeph>: </p>
      <codeblock>ALTER COLLATION "en_US" OWNER TO joe;</codeblock>
    </section>
    <section id="section6">
      <title>Compatibility</title>
      <p>There is no <codeph>ALTER COLLATION</codeph> statement in the SQL standard.</p>
    </section>
    <section id="section7">
      <title>See Also</title>
      <p><codeph><xref href="./CREATE_COLLATION.xml#topic1" type="topic" format="dita"/></codeph>,
            <codeph><xref href="./DROP_COLLATION.xml#topic1" type="topic" format="dita"
        /></codeph></p>
    </section>
  </body>
</topic>
